<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>糖尿病患者缓解调查问卷</title>
    <!-- 引入 vant UI 组件库样式文件 -->
    <link rel="stylesheet" href="../../common/css/vant-index.css" />
    <link rel="stylesheet" type="text/css" href="../../common/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../css/baseInfo.css"/>
    <style>
        .reverse-index{
            width: 4.61rem;
            height: 4.61rem;
            margin: 0 1.24rem;
        }
        .content {
            margin: 0 0.21rem;
            border-top: 1px solid #DDDDDD;
        }
        .index-content{
            font-size: 0.31rem;
            text-align: left;
            padding: 0.28rem 0.85rem;
            color: rgba(0, 0, 0, 0.65);
        }
        .content-title {
            margin-top: 0.34rem;
            font-size: 0.29rem;
        }
        .index-content1 {
            margin-top: 0.1rem;
            font-size: 0.29rem;
            font-weight: 500;
        }
        .index-content2 {
            margin-top: 0.6rem;
            font-size: 0.29rem;
            font-weight: 500;
            color: #005BAC;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <van-nav-bar title="糖尿病患者缓解调查问卷" left-text="返回" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
            <template #right>
                <van-icon name="wap-home-o" size='18' />
            </template>
        </van-nav-bar>
        <div class="container">
            <img class="reverse-index" :src="imgUrl[info.key]"></img>
            <div class="content">
                <p class="content-title">填写结果</p>
                <p class="index-content1">{{info.content}}</p>
                <p class="index-content2">{{info.result}}</p>
            </div>


        </div>
    </div>
</body>
<!-- 上线环境用 -->
<script src="../../base.js"></script>
<script src="../../common/js/vue.global.prod.js"></script>
<!-- 引入 UI 组件库 -->
<script src="../../common/js/vant.min.js"></script>
<!-- axios 接口调用 -->
<script src="../../common/js/axios.min.js"></script>
<script src="../../common/js/rem.js"></script>
<script src="../../common/js/url.min.js"></script>


<script type="module">
    const baseInfo = {
        data() {
            return {
                list: [{
                    key: 'fault',
                    content: '很抱歉，您暂不符合逆转条件，请及时与您的医助联系。',
                    result: ''
                },{
                    key: 'success',
                    content: '您符合逆转条件，请及时与您的医助联系或到店咨询逆转服务。',
                    result: ''
                },{
                    key: 'success',
                    content: '您符合逆转条件，请及时与您的医助联系或到店咨询逆转服务。',
                    result: '根据您的糖尿病并发症情况，需要进行心肺功能评估；为避免发生意外，逆转过程及生活中需避免高强度运动。'
                },{
                    key: 'success',
                    content: '您符合缓解条件，请及时与您的医助联系或到店咨询缓解服务。',
                    result: '根据您的糖尿病并发症情况，需要进行心肺功能评估；为避免发生意外，缓解过程及生活中需避免高强度运动；不宜使用生酮饮食和高蛋白饮食缓解方案。'
                }],
                info:{},
                imgUrl: {
                    success: '../img/success.png',
                    fault: '../img/note.png'
                }
            }
        },
        watch: {
            
        },
        created() {
            const result = url('?result')
            this.info = this.list[result]
        },
        methods: {
            onClickLeft() {
                window.location.href = "../index.html"
            },
            onClickRight() {
                window.location.href = "../index.html"
            }     
        },
    };

    const app = Vue.createApp(baseInfo);

    app.use(vant);
    // 通过 CDN 引入时不会自动注册 Lazyload 组件
    // 可以通过下面的方式手动注册
    app.use(vant.Lazyload);  
    app.use(vant.Popup);  

    // 调用函数组件，弹出一个 Toast
    // vant.Toast("刷新成功");
    app.mount("#app");
</script>

</html>
